#include "iostream"
using namespace std;
int main()
 { float x,sum,aver;int n;
   n=0;sum=0;
   cout<<"Please enter a number:";
   cin>>x;
   for(;x>=0;)
     { sum+=x ;  n++; 
       cout<<"Please enter a number:"; cin>>x;
       
     }
  
   aver=sum/n;
   cout<<"average="<<aver<<endl;
return 0;
 }
